package com.huike.service.system.impl;

import com.huike.mapper.system.SysDeptMapper;
import com.huike.pojo.SysDept;
import com.huike.result.PageResult;
import com.huike.result.Result;
import com.huike.service.system.SysDeptService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysDeptServiceImpl  implements SysDeptService {
    @Autowired
    private SysDeptMapper deptMapper;
    /**
     * 查询部门列表
     *
     * @param dept
     * @return
     */
    @Override
    public Result selectDeptList(SysDept dept) {
        List<SysDept> deptList = deptMapper.selectDeptList(dept);
        Result<List<SysDept>> objectResult = new Result<>();
        objectResult.setData(deptList);
        objectResult.setCode(200);
        objectResult.setMsg("查询成功");

        return  objectResult;
    }
}
